Integrand size = 35, antiderivative size = 237 \[ \int \sqrt {a+b \cos (c+d x)} \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\frac {2 \left (3 b^2 (5 A+3 C)+a (5 b B-2 a C)\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^2 d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {2 \left (a^2-b^2\right ) (5 b B-2 a C) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{15 b^2 d \sqrt {a+b \cos (c+d x)}}+\frac {2 (5 b B-2 a C) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b d}+\frac {2 C (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{5 b d} \]
[Out]
Time = 0.40 (sec) , antiderivative size = 237, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3102, 2832, 2831, 2742, 2740, 2734, 2732} \[ \int \sqrt {a+b \cos (c+d x)} \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=-\frac {2 \left (a^2-b^2\right ) (5 b B-2 a C) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{15 b^2 d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (a (5 b B-2 a C)+3 b^2 (5 A+3 C)\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^2 d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 (5 b B-2 a C) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{15 b d}+\frac {2 C \sin (c+d x) (a+b \cos (c+d x))^{3/2}}{5 b d} \]
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2831
Rule 2832
Rule 3102
Rubi steps \begin{align*} \text {integral}& = \frac {2 C (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{5 b d}+\frac {2 \int \sqrt {a+b \cos (c+d x)} \left (\frac {1}{2} b (5 A+3 C)+\frac {1}{2} (5 b B-2 a C) \cos (c+d x)\right ) \, dx}{5 b} \\ & = \frac {2 (5 b B-2 a C) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b d}+\frac {2 C (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{5 b d}+\frac {4 \int \frac {\frac {1}{4} b (15 a A+5 b B+7 a C)+\frac {1}{4} \left (3 b^2 (5 A+3 C)+a (5 b B-2 a C)\right ) \cos (c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{15 b} \\ & = \frac {2 (5 b B-2 a C) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b d}+\frac {2 C (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{5 b d}-\frac {\left (\left (a^2-b^2\right ) (5 b B-2 a C)\right ) \int \frac {1}{\sqrt {a+b \cos (c+d x)}} \, dx}{15 b^2}+\frac {1}{15} \left (15 A+9 C+\frac {a (5 b B-2 a C)}{b^2}\right ) \int \sqrt {a+b \cos (c+d x)} \, dx \\ & = \frac {2 (5 b B-2 a C) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b d}+\frac {2 C (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{5 b d}+\frac {\left (\left (15 A+9 C+\frac {a (5 b B-2 a C)}{b^2}\right ) \sqrt {a+b \cos (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}} \, dx}{15 \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {\left (\left (a^2-b^2\right ) (5 b B-2 a C) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}} \, dx}{15 b^2 \sqrt {a+b \cos (c+d x)}} \\ & = \frac {2 \left (15 A+9 C+\frac {a (5 b B-2 a C)}{b^2}\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {2 \left (a^2-b^2\right ) (5 b B-2 a C) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{15 b^2 d \sqrt {a+b \cos (c+d x)}}+\frac {2 (5 b B-2 a C) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b d}+\frac {2 C (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{5 b d} \\ \end{align*}
Time = 1.95 (sec) , antiderivative size = 189, normalized size of antiderivative = 0.80 \[ \int \sqrt {a+b \cos (c+d x)} \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\frac {2 \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \left (b^2 (15 a A+5 b B+7 a C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )+\left (15 A b^2+5 a b B-2 a^2 C+9 b^2 C\right ) \left ((a+b) E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )-a \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )\right )\right )+2 b (a+b \cos (c+d x)) (5 b B+a C+3 b C \cos (c+d x)) \sin (c+d x)}{15 b^2 d \sqrt {a+b \cos (c+d x)}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(1186\) vs. \(2(275)=550\).
Time = 10.16 (sec) , antiderivative size = 1187, normalized size of antiderivative = 5.01
method | result | size |
default | \(\text {Expression too large to display}\) | \(1187\) |
parts | \(\text {Expression too large to display}\) | \(1289\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.13 (sec) , antiderivative size = 512, normalized size of antiderivative = 2.16 \[ \int \sqrt {a+b \cos (c+d x)} \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\frac {\sqrt {2} {\left (-4 i \, C a^{3} + 10 i \, B a^{2} b - 3 i \, {\left (5 \, A + C\right )} a b^{2} - 15 i \, B b^{3}\right )} \sqrt {b} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right ) + \sqrt {2} {\left (4 i \, C a^{3} - 10 i \, B a^{2} b + 3 i \, {\left (5 \, A + C\right )} a b^{2} + 15 i \, B b^{3}\right )} \sqrt {b} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right ) - 3 \, \sqrt {2} {\left (2 i \, C a^{2} b - 5 i \, B a b^{2} - 3 i \, {\left (5 \, A + 3 \, C\right )} b^{3}\right )} \sqrt {b} {\rm weierstrassZeta}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right )\right ) - 3 \, \sqrt {2} {\left (-2 i \, C a^{2} b + 5 i \, B a b^{2} + 3 i \, {\left (5 \, A + 3 \, C\right )} b^{3}\right )} \sqrt {b} {\rm weierstrassZeta}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right )\right ) + 6 \, {\left (3 \, C b^{3} \cos \left (d x + c\right ) + C a b^{2} + 5 \, B b^{3}\right )} \sqrt {b \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{45 \, b^{3} d} \]
[In]
[Out]
\[ \int \sqrt {a+b \cos (c+d x)} \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\int \sqrt {a + b \cos {\left (c + d x \right )}} \left (A + B \cos {\left (c + d x \right )} + C \cos ^{2}{\left (c + d x \right )}\right )\, dx \]
[In]
[Out]
\[ \int \sqrt {a+b \cos (c+d x)} \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right ) + A\right )} \sqrt {b \cos \left (d x + c\right ) + a} \,d x } \]
[In]
[Out]
\[ \int \sqrt {a+b \cos (c+d x)} \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right ) + A\right )} \sqrt {b \cos \left (d x + c\right ) + a} \,d x } \]
[In]
[Out]
Timed out. \[ \int \sqrt {a+b \cos (c+d x)} \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\int \sqrt {a+b\,\cos \left (c+d\,x\right )}\,\left (C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )+A\right ) \,d x \]
[In]
[Out]